<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .outer {
        width: 400px;
        height: 400px;
        background-color: gray;
        text-align: center;
        line-height: 400px;
        margin: 0 auto;
        display: inline-block;
      }
      .inner {
        background-color: orange;
        font-size: 20px;
        /* display: inline-block; */
      }
    </style>
  </head>
  <body>
    <span class="outer">
      <span class="inner">文字居中dd</span>
    </span>
  </body>
</html>
